package com.asset.salesforce.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="view_selected_fields")
public class ViewSelectedFields implements Serializable{
	
 private Integer id;
 private String fieldName;
 private View view;
 private Integer fieldOrder;
 
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="view_selected_fields_id_seq")
	@SequenceGenerator(name="view_selected_fields_id_seq",sequenceName="view_selected_fields_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name="field_name")
	public String getFieldName() {
		return fieldName;
	}
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
	
	@ManyToOne
	@JoinColumn(name="view_id")
	public View getView() {
		return view;
	}
	public void setView(View view) {
		this.view = view;
	}
	
	@Column(name="field_order")
	public Integer getFieldOrder() {
		return fieldOrder;
	}
	public void setFieldOrder(Integer fieldOrder) {
		this.fieldOrder = fieldOrder;
	}

}
